using System;
using System.Collections.Generic;

namespace CMS.Core.Domain
{
    /// <summary>
    /// ThongBao object for NHibernate mapped table ThongBao.
    /// </summary>
    [Serializable]
    public class ThongBao : DomainObject<System.Int32>
    {


        private System.String _TenThongBao;
        private System.String _NoiDung;
        private System.String _FileDinhKem;
        private System.DateTime _NgayCapNhat;
        private System.String _NguoiCapNhat;
        private NguoiSuDung _NguoiCapNhatLookup;

        public ThongBao()
        {
        }

        public ThongBao(System.Int32 id)
        {
            base.ID = id;
        }

         public virtual System.String TenThongBao {
             get { return _TenThongBao; }
             set { _TenThongBao = value;}
         }

         public virtual System.String NoiDung {
             get { return _NoiDung; }
             set { _NoiDung = value;}
         }

         public virtual System.String FileDinhKem {
             get { return _FileDinhKem; }
             set { _FileDinhKem = value;}
         }

         public virtual System.DateTime NgayCapNhat {
             get { return _NgayCapNhat; }
             set { _NgayCapNhat = value;}
         }

         public virtual System.String NguoiCapNhat {
             get { return _NguoiCapNhat; }
             set { _NguoiCapNhat = value;}
         }

         public virtual NguoiSuDung NguoiCapNhatLookup{
             get { return _NguoiCapNhatLookup; }
             set { _NguoiCapNhatLookup = value;}
         }

        public virtual string TenNguoiCapNhat 
        {
            get 
            { 
                return this.NguoiCapNhatLookup.TenNguoiSuDung; 
            }            
        }

        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }

     }
}
